<?php
/**
 * Description
 *
 * PHP version 7
 *
 * @category Custom
 * @package  Custom
 * @author   ryu <mo5467@126.com>
 * @date     2020-04-25 12:40:55
 * @lastTime 2020-05-01 23:01:51
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     none
 */

namespace Design\Structural\Proxy;

class BankAccountProxy extends HeavyBankAccount implements BankAccount
{

    private $amount = null;


    public function getBalance(): int
    {
        if ($this->amount === null) {
            $this->amount = parent::getBalance();
        }

        return $this->amount;

    }//end getBalance()


}//end class
